Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

index_of

interval.index_of

(e T)
 => 
option i64
[Redefinition of  Sequence.index_of]
index of `e` in this interval, `nil` if not contained

Inverse of `nth`: for a valid index `i`, `index_of` of the `i`-th
element returns `i`.

Complexity: O(1), unlike the inherited O(n) search. This depends on
`contains` being redefined in this feature to be O(1) as well.
Precondition
Inherited from Sequence.index_of
pre
  T : property.equatable

redefines:

0.099dev (GIT hash 9b94ad4b4a4bff2bf2be7d77be2c6e1fd7683c4d)
last changed: 2026-09-23